﻿<%@page import="com.yayan.xh.bean.EnterBean"%>
<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>

<meta charset="utf-8">
<title>现场抽奖</title>

<link rel="stylesheet" href="<%=basePath %>CSS/styleluck.css">
<link rel="icon" href="<%=basePath %>Images/logo.ico" type="image/x-icon"/> 
<link rel="shortcut icon" href="<%=basePath %>Images/logo.ico" type="image/x-icon"/> 
</head>
<body>

<div class='luck-back'>
	<div class="luck-content ce-pack-end">
		<div id="luckuser" class="slotMachine">
			<div class="slot">
				<span class="name">姓名</span>
			</div>
		</div>
		<div class="luck-content-btn">
			中奖信息：<input type="text" id="flagtext"/>
		</div>
		<div class="luck-content-btn">
			<a id="start" class="start" onclick="start()">开始</a>
		</div>
		<div class="luck-user">
			<div class="luck-user-title">
				<span>中奖名单</span>
			</div>
			<ul class="luck-user-list">
				<c:forEach items="${luckBoys }" var="enterBean">
					<li>
						<div class='portrait' style='background-image:url("${enterBean.u_avatarUrl}")'></div><div class='luckuserName'>${enterBean.u_nickname }</div>
					</li>	
				</c:forEach>
				
			</ul>
			<div class="luck-user-btn">
				<a href="#">中奖人</a>
			</div>
		</div>
	</div>
</div>

<script src="<%=basePath %>Javascript/jquery-2.2.1.min.js" type="text/javascript"></script>
<script>
	var lotteryDrawArray = [
		<%
		List<EnterBean> list = (List<EnterBean>) request.getAttribute("list");
		for(int i=0;i < list.size();i++) {
			EnterBean bean = list.get(i);
			if(i-1 != list.size()) {
		%>{avaterUrl:'<%=bean.getU_avatarUrl()%>',
			nickName:'<%=bean.getU_nickname()%>',
			eid:'<%=bean.getE_id()%>'},
		<%
			} else {
		%>
				{avaterUrl:'<%=bean.getU_avatarUrl()%>',
					nickName:'<%=bean.getU_nickname()%>',
					eid:'<%=bean.getE_id()%>'}
		<%
			}
		}
		
		%>
	];
</script>
<script src="<%=basePath %>Javascript/Luckdraw.js" type="text/javascript"></script>
</body>
</html>
